﻿using JX.Application;
using JX.Core.Entity;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace JXWebSite.Components
{
	/// <summary>
	/// 模型字段基类
	/// </summary>
	public abstract class BaseModelField : ViewComponent
	{
		/// <summary>
		/// 空白构造
		/// </summary>
		public BaseModelField()
		{
		}
		/// <summary>
		/// 异步调用
		/// </summary>
		/// <param name="viewModel"></param>
		/// <returns></returns>
		public async Task<IViewComponentResult> InvokeAsync(FieldControlViewModel viewModel = null)
		{
			viewModel = await GetViewModelAsync(viewModel);
			return View(viewModel);
		}
		private Task<FieldControlViewModel> GetViewModelAsync(FieldControlViewModel viewModel)
		{
			if (viewModel == null)
			{
				viewModel = new FieldControlViewModel();
			}
			return Task.FromResult(viewModel);
		}
	}

	/// <summary>
	/// 标题字段
	/// </summary>
	[ViewComponent(Name = "TitleType")]
	public class TitleType : BaseModelField
	{
		/// <summary>
		/// 空白构造
		/// </summary>
		public TitleType()
		{
		}
	}

	/// <summary>
	/// 状态字段
	/// </summary>
	[ViewComponent(Name = "StatusType")]
	public class StatusType : BaseModelField
	{
		/// <summary>
		/// 空白构造
		/// </summary>
		public StatusType()
		{
		}
	}

	/// <summary>
	/// 节点字段
	/// </summary>
	[ViewComponent(Name = "NodeType")]
	public class NodeType : BaseModelField
	{
		/// <summary>
		/// 空白构造
		/// </summary>
		public NodeType()
		{
		}
	}

	/// <summary>
	/// 节点字段（多选）
	/// </summary>
	[ViewComponent(Name = "NodeCategory")]
	public class NodeCategory : BaseModelField
	{
		/// <summary>
		/// 空白构造
		/// </summary>
		public NodeCategory()
		{
		}
	}

	/// <summary>
	/// 行业类别字段
	/// </summary>
	[ViewComponent(Name = "IndustryCategory")]
	public class IndustryCategory : BaseModelField
	{
		/// <summary>
		/// 空白构造
		/// </summary>
		public IndustryCategory()
		{
		}
	}

	/// <summary>
	/// 所属其它节点字段
	/// </summary>
	[ViewComponent(Name = "InfoType")]
	public class InfoType : BaseModelField
	{
		/// <summary>
		/// 空白构造
		/// </summary>
		public InfoType()
		{
		}
	}

	/// <summary>
	/// 专题字段
	/// </summary>
	[ViewComponent(Name = "SpecialType")]
	public class SpecialType : BaseModelField
	{
		/// <summary>
		/// 空白构造
		/// </summary>
		public SpecialType()
		{
		}
	}

	/// <summary>
	/// 文本字段
	/// </summary>
	[ViewComponent(Name = "TextType")]
	public class TextType : BaseModelField
	{
		/// <summary>
		/// 空白构造
		/// </summary>
		public TextType()
		{
		}
	}

	/// <summary>
	/// 多行文本字段
	/// </summary>
	[ViewComponent(Name = "MultipleTextType")]
	public class MultipleTextType : BaseModelField
	{
		/// <summary>
		/// 空白构造
		/// </summary>
		public MultipleTextType()
		{
		}
	}

	/// <summary>
	/// HTML编辑器字段
	/// </summary>
	[ViewComponent(Name = "MultipleHtmlTextType")]
	public class MultipleHtmlTextType : BaseModelField
	{
		/// <summary>
		/// 空白构造
		/// </summary>
		public MultipleHtmlTextType()
		{
		}
	}

	/// <summary>
	/// 内容编辑器字段
	/// </summary>
	[ViewComponent(Name = "ContentType")]
	public class ContentType : BaseModelField
	{
		/// <summary>
		/// 空白构造
		/// </summary>
		public ContentType()
		{
		}
	}

	/// <summary>
	/// 整数字段
	/// </summary>
	[ViewComponent(Name = "IntegerType")]
	public class IntegerType : BaseModelField
	{
		/// <summary>
		/// 空白构造
		/// </summary>
		public IntegerType()
		{
		}
	}

	/// <summary>
	/// 数字字段
	/// </summary>
	[ViewComponent(Name = "NumberType")]
	public class NumberType : BaseModelField
	{
		/// <summary>
		/// 空白构造
		/// </summary>
		public NumberType()
		{
		}
	}

	/// <summary>
	/// 金额字段
	/// </summary>
	[ViewComponent(Name = "MoneyType")]
	public class MoneyType : BaseModelField
	{
		/// <summary>
		/// 空白构造
		/// </summary>
		public MoneyType()
		{
		}
	}

	/// <summary>
	/// 时间字段
	/// </summary>
	[ViewComponent(Name = "DateTimeType")]
	public class DateTimeType : BaseModelField
	{
		/// <summary>
		/// 空白构造
		/// </summary>
		public DateTimeType()
		{
		}
	}

	/// <summary>
	/// 
	/// </summary>
	[ViewComponent(Name = "LookType")]
	public class LookType : BaseModelField
	{
		/// <summary>
		/// 空白构造
		/// </summary>
		public LookType()
		{
		}
	}

	/// <summary>
	/// 链接字段
	/// </summary>
	[ViewComponent(Name = "LinkType")]
	public class LinkType : BaseModelField
	{
		/// <summary>
		/// 空白构造
		/// </summary>
		public LinkType()
		{
		}
	}

	/// <summary>
	/// 是否框字段
	/// </summary>
	[ViewComponent(Name = "BoolType")]
	public class BoolType : BaseModelField
	{
		/// <summary>
		/// 空白构造
		/// </summary>
		public BoolType()
		{
		}
	}

	/// <summary>
	/// 图片字段
	/// </summary>
	[ViewComponent(Name = "PictureType")]
	public class PictureType : BaseModelField
	{
		/// <summary>
		/// 空白构造
		/// </summary>
		public PictureType()
		{
		}
	}

	/// <summary>
	/// 多图字段
	/// </summary>
	[ViewComponent(Name = "MultiplePhotoType")]
	public class MultiplePhotoType : BaseModelField
	{
		/// <summary>
		/// 空白构造
		/// </summary>
		public MultiplePhotoType()
		{
		}
	}

	/// <summary>
	/// 文件字段
	/// </summary>
	[ViewComponent(Name = "FileType")]
	public class FileType : BaseModelField
	{
		/// <summary>
		/// 空白构造
		/// </summary>
		public FileType()
		{
		}
	}

	/// <summary>
	/// 颜色字段
	/// </summary>
	[ViewComponent(Name = "ColorType")]
	public class ColorType : BaseModelField
	{
		/// <summary>
		/// 空白构造
		/// </summary>
		public ColorType()
		{
		}
	}

	/// <summary>
	/// 模板字段
	/// </summary>
	[ViewComponent(Name = "TemplateType")]
	public class TemplateType : BaseModelField
	{
		/// <summary>
		/// 空白构造
		/// </summary>
		public TemplateType()
		{
		}
	}

	/// <summary>
	/// 
	/// </summary>
	[ViewComponent(Name = "OperatingType")]
	public class OperatingType : BaseModelField
	{
		/// <summary>
		/// 空白构造
		/// </summary>
		public OperatingType()
		{
		}
	}

	/// <summary>
	/// 厂商字段
	/// </summary>
	[ViewComponent(Name = "Producer")]
	public class Producer : BaseModelField
	{
		/// <summary>
		/// 
		/// </summary>
		public Producer()
		{
		}
	}

	/// <summary>
	/// 品牌字段
	/// </summary>
	[ViewComponent(Name = "Trademark")]
	public class Trademark : BaseModelField
	{
		/// <summary>
		/// 
		/// </summary>
		public Trademark()
		{
		}
	}

	/// <summary>
	/// 选择会员字段
	/// </summary>
	[ViewComponent(Name = "SelectUserType")]
	public class SelectUserType : BaseModelField
	{
		/// <summary>
		/// 
		/// </summary>
		public SelectUserType()
		{
		}
	}

	/// <summary>
	/// IP显示字段
	/// </summary>
	[ViewComponent(Name = "IPType")]
	public class IPType : BaseModelField
	{
		/// <summary>
		/// 
		/// </summary>
		public IPType()
		{
		}
	}

	/// <summary>
	/// 会员名显示字段
	/// </summary>
	[ViewComponent(Name = "UserNameType")]
	public class UserNameType : BaseModelField
	{
		/// <summary>
		/// 
		/// </summary>
		public UserNameType()
		{
		}
	}

	/// <summary>
	/// 行政区划字段
	/// </summary>
	[ViewComponent(Name = "RegionType")]
	public class RegionType : BaseModelField
	{
		/// <summary>
		/// 
		/// </summary>
		public RegionType()
		{
		}
	}

	/// <summary>
	/// 5级行政区划字段
	/// </summary>
	[ViewComponent(Name = "RegionTypeFive")]
	public class RegionTypeFive : BaseModelField
	{
		/// <summary>
		/// 
		/// </summary>
		public RegionTypeFive()
		{
		}
	}

	/// <summary>
	/// 行政区划+文本
	/// </summary>
	[ViewComponent(Name = "RegionTypeText")]
	public class RegionTypeText : BaseModelField
	{
		/// <summary>
		/// 
		/// </summary>
		public RegionTypeText()
		{
		}
	}

	/// <summary>
	/// 行政区划字段（多选）
	/// </summary>
	[ViewComponent(Name = "RegionTypeSelect")]
	public class RegionTypeSelect : BaseModelField
	{
		/// <summary>
		/// 
		/// </summary>
		public RegionTypeSelect()
		{
		}
	}

	/// <summary>
	/// 验证码字段
	/// </summary>
	[ViewComponent(Name = "ValidateCodeType")]
	public class ValidateCodeType : BaseModelField
	{
		/// <summary>
		/// 
		/// </summary>
		public ValidateCodeType()
		{
		}
	}

	/// <summary>
	/// 选项字段
	/// </summary>
	[ViewComponent(Name = "ListBoxType")]
	public class ListBoxType : BaseModelField
	{
		/// <summary>
		/// 
		/// </summary>
		public ListBoxType()
		{
		}
	}

	/// <summary>
	/// 选项数据源字段
	/// </summary>
	[ViewComponent(Name = "ListBoxDataType")]
	public class ListBoxDataType : BaseModelField
	{
		/// <summary>
		/// 
		/// </summary>
		public ListBoxDataType()
		{
		}
	}

	/// <summary>
	/// 编号字段
	/// </summary>
	[ViewComponent(Name = "NumBuilder")]
	public class NumBuilder : BaseModelField
	{
		/// <summary>
		/// 
		/// </summary>
		public NumBuilder()
		{
		}
	}

	/// <summary>
	/// 二维码字段
	/// </summary>
	[ViewComponent(Name = "QRCodeType")]
	public class QRCodeType : BaseModelField
	{
		/// <summary>
		/// 
		/// </summary>
		public QRCodeType()
		{
		}
	}

	/// <summary>
	/// 商品属性
	/// </summary>
	[ViewComponent(Name = "Property")]
	public class Property : BaseModelField
	{
		/// <summary>
		/// 
		/// </summary>
		public Property()
		{
		}
	}

	/// <summary>
	/// 商品款式字段
	/// </summary>
	[ViewComponent(Name = "ProductStyle")]
	public class ProductStyle : BaseModelField
	{
		/// <summary>
		/// 
		/// </summary>
		public ProductStyle()
		{
		}
	}
}
